﻿// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2018-12-17 14:35:08
// 负责人：liucx
// ===================================================================
using System;
using System.Data;
using System.Collections.Generic;
using OF.Utility;
using OF.Component.Model;
using OF.Component.IDAL;
using OF.Component.Factory;
namespace OF.Component.BLL
{

    /// <summary>
    ///通知消息
    /// </summary>
    public partial class MessageOperate
    {
        
        private static readonly IMessage dal = Message.CreateInstance();



        public static int GetMaxID()
        {
            return dal.GetMaxID();
        }

        public static long Insert(MessageInfo info)
        {
            long reValue = dal.Insert(info);
            return reValue;
        }

        public static void Update(MessageInfo info)
        {
            dal.Update(info);
        }

        public static void Delete(long messageID)
        {
            dal.Delete(messageID);
        }

        public static IList<MessageInfo> Search(out int pageCount, int pageIndex, int pageSize, string where, string orderField, bool isDesc)
        {
            return dal.Search(out pageCount, pageIndex, pageSize, where, orderField, isDesc);
        }

        public static MessageInfo GetByID(long messageID)
        {
           return dal.GetByID(messageID);
           
        }
    }

}